import { NAV_TYPES } from '@/typings';

//数据某项对象
interface INewsInfo {
  uniquekey: string;
  title: string;
  date: string;
  category: string;
  anthor_name: string;
  url: string;
  thumbnail_pic_s?: string; //可选
  thumbnail_pic_s02?: string;
  thumbnail_pic_s03?: string;
}

//state.newsList的类型
interface INewsList {
  hasMore: boolean;
  isLoading: boolean;
  pageNum: number;
  count: number;
  news: INewsInfo[];
}

//home -> state的类型
interface IHomeState {
  currentType: NAV_TYPES;
  newsList: INewsList;
}

//detail -> state的类型
interface IDetailState {
  currentNews: INewsInfo;
}

export { INewsList, INewsInfo, IHomeState, IDetailState };
